{extend name="base"}
{block name="content"}
		<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Admin/index')}">管理员</a></li>
			<li><a href="{:url('Admin/add')}">管理员添加</a></li>
		</ul>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>用户名</th>
					<th>类型</th>
					<th>最后登录IP</th>
					<th>最后登录时间</th>
					<th>状态</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody>
				{empty name="list"}
				<tr><td colspan="7">没有数据</td></tr>
				{else/}
				{volist name="list" id="vo"}
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.username}</td>
					<td>{if condition="$vo.id eq 1"}<span class="red">超级管理员</span>{else/}普通管理员{/if}</td>
					<td>{empty name="vo.last_login_ip"}----{else/}{$vo.last_login_ip}{/empty}</td>
					<td>{empty name="vo.last_login_time"}----{else/}{$vo.last_login_time|date='Y-m-d H:i:s',###}{/empty}</td>
					<td>{if condition="$vo.status eq -1"}<span class="red">已锁定</span>{else/}<span class="green">正常</span>{/if}</td>
					<td>
						{if condition="$vo.status eq 0 AND $vo.id neq 1"}
						<a href="{:url('backend/Admin/lock',['id'=>$vo.id,'status'=>-1])}" class="js-ajax-dialog-btn" data-msg="您确定要锁定此用户吗？">锁定用户</a>|
						{/if}
						{if condition="$vo.status eq -1"}
						<a href="{:url('backend/Admin/lock',['id'=>$vo.id,'status'=>0])}" class="js-ajax-dialog-btn" data-msg="您确定要解锁此用户吗？">解锁用户</a>|
						{/if}

						<a href="{:url('Admin/edit',['id'=>$vo.id])}">编辑</a>
						{if condition="$vo.id neq 1"}
						| <a href="{:url('Admin/priv',['id'=>$vo.id])}">权限设置</a>
						| <a href="{:url('Admin/del',['id'=>$vo.id])}" class="js-ajax-delete">删除</a>
						{/if}
					</td>
				</tr>
				{/volist}
				{/empty}		
			</tbody>
		</table>
		<div class="pagination"></div>
	</div>
		<script src="__THEMES__/js/common.js"></script>
{/block}